﻿using System.IO;

namespace SvnFlow
{
    public class SvnHelper
    {
        public const string SerializedTimeFormat = "yyyy-MM-ddTHH:mm:ss.fff";
        public const string TimeFormat = "yyyy.MM.dd HH:mm:ss";

        public static void DeleteRecursiveFolder(string folderPath)
        {
            if (!Directory.Exists(folderPath))
                return;

            foreach (var folder in Directory.GetDirectories(folderPath))
            {
                DeleteRecursiveFolder(folder);
            }

            foreach (var file in Directory.GetFiles(folderPath))
            {
                File.SetAttributes(file, FileAttributes.Normal);
                File.Delete(file);
            }

            Directory.Delete(folderPath);
        }
    }
}
